<admintpl file="header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>续借电审列表</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('padtrial/renew_padtrial')}" style='line-height: 46px;'>
        手机：
        <input type="text" name="mobile" style="width: 200px;" value="{:I('request.mobile')}" placeholder="请输入手机号码">
        用户名：
        <input type="text" name="name" style="width: 200px;" value="{:I('request.name')}" placeholder="姓名">
        <php>$group=get_groups_admin_user();</php>
        <if condition="!($group eq 3 || $group eq 8)">
            认领状态：
            <select name="byusers">
                <option value="1">全部</option>
                <option value="2">未认领</option>
                <option value="3">我的客户</option>
            </select>
            <script>
                $('select[name="byusers"]').find('option[value="{:I(\'request.byusers\')}"]').prop('selected',true);
            </script>
        </if>
        <br/>
        申请日期：<input class="js-date" type="text" name="starts" style="width: 200px;" value="{:I('request.starts')}" placeholder="起始日期">
        <input class="js-date" type="text" name="ends" style="width: 200px;" value="{:I('request.ends')}" placeholder="结束日期">

        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>创建时间</th>
                <th>用户名</th>
                <th>身份证</th>
                <th>借款金额</th>
                <th>借款周期</th>
                <th>分期数</th>
                <th>用户认证</th>
                <th>审核状态</th>
                <th>手机类型</th>
                <th>学历</th>
                <th>负责专员</th>
                <th>渠道来源</th>
				<th>是否快速审核</th>
                <th align="center">审核</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.crtime}</td>
                    <td><a href="{:U('Examine/overdue_info',array('id'=>$vo['id'],'disp'=>'renew_padtrial'))}" >{$vo.name}</a></td>
                    <td>{$vo.identity}</td>
                    <td>{$vo.amount}</td>
                    <td>{$vo.loan_day}天</td>
                    <td align="center">{$vo.stages}</td>
                    <php>$ds=array('0'=>'<span style="color:red">未认证</span>','1'=>'<span style="color:green">已认证</span>','2'=>'<span style="color:red">认证未通过</span>','3'=>'<span style="color:red">暂时不需要</span>')</php>
                    <td>{$ds[$vo['account_status']]}</td>
                    <td><if condition="($vo.status eq 0)">待审核
                        <elseif condition="$vo.status eq 1"/>借款中
                        <elseif condition="$vo.status eq 2"/>已还款
                        <elseif condition="$vo.status eq 3"/>逾期
                        <elseif condition="$vo.status eq 4"/>已到期
                        <elseif condition="$vo.status eq 5"/>审核中
                        <elseif condition="$vo.status eq 6"/>审核不通过
                        <elseif condition="$vo.status eq 7"/>驳回
                        <elseif condition="$vo.status eq 8"/>放款成功
                        <elseif condition="$vo.status eq 9"/>放款不成功
                        <elseif condition="$vo.status eq 10"/>待放款
                    </if></td>
                    <td>{$vo['photo_type']==1?'苹果':'安卓'}</td>
                    <td>{$vo['education']}</td>
                    <td>{$admins[$vo['byusers']]}</td>
                    <td>{$codes[$vo['code']]}</td>
					<td>
					<if condition="($vo.fast_auditing eq 1)"><span style='color: red;'>是</span>
					<else/>否
					</if>
					</td>
                    <td align="center">
                        <!--<a class="js-ajax-dialog-btn" data-msg="是否通过？" href="{:U('padtrial/padtrial',['id'=>$vo['id'],'is_pass'=>1])}" >通过</a>&nbsp;|
                        <a class="js-ajax-dialog-btn" data-msg="是否不通过？" href="{:U('padtrial/padtrial',['id'=>$vo['id'],'is_pass'=>0])}" >不通过</a>-->
                        <a href="{:U('Examine/info',array('id'=>$vo['id'],'renew'=>1,'from_type'=>5))}" >审核</a>&nbsp
                        <a href="{:U('Examine/padtrial_record',array('id'=>$vo['id'],'pt_type'=>1))}">电审记录</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
            <tfoot>
            <tr>
                <td>当页合计：</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td>总合计：</td>
                <td></td>
                <td></td>
                <td>{$total_amount}</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            </tfoot>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    $(function () {
        var arr = [3];//要取哪几列的合计
        var def = 'var ';
        for(var a in arr){
            def += ('total'+arr[a]+'=0,');
        }
        def=def.substring(0,def.length-1)+';';
        eval(def);//执行定义
        $('tbody tr').each(function() {
            for(var i in arr){
                $(this).find('td:eq('+arr[i]+')').each(function(){
                    var tmp = $(this).text();
                    if(tmp === ''){
                        tmp = 0;
                    }
                    eval('total'+arr[i]+'+=parseFloat(tmp);');
                });
            }
        });
        for(var x in arr){
            $('tfoot tr:eq(0)').find('td:eq('+arr[x]+')').text(eval('total'+arr[x]));
        }
    });
</script>
</body>
</html>